package com.lagou.service.impl;

import com.lagou.dao.ArticleDao;
import com.lagou.domain.Article;
import com.lagou.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Roger
 * @date 2020/8/16 17:27
 * @description
 */
@Service
public class ArticleServiceImpl implements ArticleService {
    @Autowired
    private ArticleDao articleDao;

    @Override
    public void saveArticle(Article article) {
        //添加章节信息
        articleDao.saveArticle(article);

        //人为制造异常检测事务控制是否生效
        int i = 1 / 0;
    }
}
